﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="原料到货旬报.aspx.cs" Inherits="syc.Sale.原料到货旬报" %>

<head runat="server">
    <title></title>
</head>
<body>
<SCRIPT LANGUAGE="javascript">
//指定页面区域内容导入Excel
function AllAreaExcel()
{
    var oWD = new ActiveXObject("Word.Application");
    var oDC = oWD.Documents.Add("", 0, 1);
    var oRange = oDC.Range(0, 1);
    var sel = document.body.createTextRange();
    sel.moveToElementText(report);
    sel.select();
    sel.execCommand("Copy");
    oRange.Paste();
    oWD.Application.Visible = true;
}
</script>
  <script type="text/javascript" language="javascript" src="/common.js"></script>
   <form id="form1" runat="server">  
      <div id="wintop" class="wintop"><span lang="zh-cn">主要供应旬报</span></div>
        <asp:Panel ID="Panel1" runat="server" CssClass="panel" Height="36px" >
        年份：<asp:DropDownList ID="Year" runat="server">
            <asp:ListItem>2009</asp:ListItem>
            <asp:ListItem>2010</asp:ListItem>
            <asp:ListItem>2011</asp:ListItem>
            <asp:ListItem>2012</asp:ListItem>
            <asp:ListItem>2013</asp:ListItem>
            <asp:ListItem>2014</asp:ListItem>
            <asp:ListItem>2015</asp:ListItem>           
            </asp:DropDownList>
            <span lang="zh-cn">&nbsp;月份：</span><asp:DropDownList ID="Month" runat="server">
                <asp:ListItem>1</asp:ListItem>
                <asp:ListItem>2</asp:ListItem>
                <asp:ListItem>3</asp:ListItem>
                <asp:ListItem>4</asp:ListItem>
                <asp:ListItem>5</asp:ListItem>
                <asp:ListItem>6</asp:ListItem>
                <asp:ListItem>7</asp:ListItem>
                <asp:ListItem>8</asp:ListItem>
                <asp:ListItem>9</asp:ListItem>
                <asp:ListItem>10</asp:ListItem>
                <asp:ListItem>11</asp:ListItem>
                <asp:ListItem>12</asp:ListItem>
            </asp:DropDownList>
             <span lang="zh-cn">&nbsp;旬：</span><asp:DropDownList ID="Xun" runat="server">
                <asp:ListItem>上旬</asp:ListItem>
                <asp:ListItem>中旬</asp:ListItem>
                <asp:ListItem>下旬</asp:ListItem>               
            </asp:DropDownList>
            <span lang="zh-cn">&nbsp;&nbsp;</span><asp:Button ID="Button_Query"
            runat="server" Text="查看报表" CssClass="button" UseSubmitBehavior="true" onclick="Button_Query_Click" 
             />            
          <input type="button" onclick="javascript:AllAreaExcel();" value="导 出" class="button">
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt" Visible="True"></asp:Label>
        </asp:Panel> 
 <div align="center" id="report">    
        <h2>
           主材供应旬报表         
        </h2>      

      <table>
        <tr>
         <td width="250px">填报单位：供应处</td><td width="280px">填报时间：<%=旬截止日期.ToString("yyyy-MM-dd") %> </td><td width="100px">单位:吨</td>
        </tr>
      </table>
      <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"  
        DataSourceID="SqlDataSource1" style="text-align: center" BorderColor="Black" 
                BorderStyle="Solid" BorderWidth="2px" Width="720px">         
        <RowStyle Height="20px" />
      
        <Columns>
                       
            <asp:BoundField DataField="主材名称" HeaderText="主材名称" SortExpression="主材名称" />        
            
            <asp:BoundField DataField="名称" HeaderText="供应单位" SortExpression="名称" />
                     
            <asp:BoundField DataField="当旬到货量" HeaderText="当旬到货量" ReadOnly="True" 
                SortExpression="当旬到货量" />
            
            <asp:BoundField DataField="当月累计量" HeaderText="当月到货量" 
                SortExpression="当月累计量" />
                
             <asp:BoundField  DataField="全年合同量" HeaderText="全年合同量" ReadOnly="True" 
                SortExpression="全年合同量" />
                
            <asp:BoundField DataField="当旬合同量" HeaderText="当旬合同量" 
                SortExpression="当旬合同量" />
            
            <asp:BoundField DataField="当年累计量" HeaderText="当年累计到货量" 
            SortExpression="当年累计量"/>            
              
            
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"         
>
    </asp:SqlDataSource>
    </div>
    </form>
</body>
</html>
